/*
package com.jstide.credit.data.client;

import com.alibaba.druid.pool.DruidPooledConnection;
import com.jstide.credit.data.service.Algorithm;
import com.jstide.credit.data.service.ResultSetTransfer;
import com.jstide.credit.data.service.biz.*;
import com.jstide.credit.data.client.jdbc.DBPoolConnection;
import com.jstide.credit.data.service.biz.Factor3;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class MyTest {

    public static final Logger logger = LoggerFactory.getLogger(MyTest.class);

    private static  final  ArrayList<Algorithm> algorithms =new ArrayList(32){{
      */
/*  add(new Factor3());add(new Factor4());add(new Factor5());add(new Factor6_7());
        add(new Factor8());add(new Factor9());add(new Factor10());add(new Factor11());
        add(new Factor12());add(new Factor13());add(new Factor14());add(new Factor15());
        add(new Factor16());add(new Factor17());add(new Factor18());add(new Factor19());
        add(new Factor20());add(new Factor21());add(new Factor22());add(new Factor23());
        add(new Factor24());add(new Factor25());add(new Factor26());add(new Factor27());
        add(new Factor28());add(new Factor29());add(new Factor30());add(new Factor31());
        add(new Factor32());add(new Factor33());;add(new Factor34());*//*

    }};

    public static void main(String[] args) {
        ExecutorService executorService = Executors.newCachedThreadPool();
        for(int i=0;i<10;i++) {
            Algorithm algorithm = algorithms.get(0);
            executorService.execute(() -> executeQuery(algorithm.getSql(),algorithm::translate));
        }
    }



    public static ResultSet executeQuery(String sql, ResultSetTransfer t){
        DBPoolConnection dbPoolConnection = DBPoolConnection.getInstance();
        try( DruidPooledConnection conn =dbPoolConnection.getConnection()) {
            conn.setAutoCommit(false);
            try( PreparedStatement statement = conn.prepareStatement(sql)){
                 ResultSet rs= statement.executeQuery();
                 t.translate(rs);
            }
            catch (Exception e){
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
        catch (Exception e){}
        return null;
    }



}
*/
